cmake_minimum_required(VERSION 3.0.2)
project(paths_routing)

# 在这里如果不设置，出现无法调试，直接执行结束
# set(CMAKE_BUILD_TYPE "Debug")


## Compile as C++14, supported in ROS Kinetic and newer
add_compile_options(-std=c++14)

set(SRC_FILE
    src/common/paths_routing_parameters.cpp
    src/common/cartesian_to_frenet.cpp

    src/CubicSpline/CubicSpline1D.cpp
    src/CubicSpline/CubicSpline2D.cpp

    src/polynomial/QuinticPolynomial.cpp
    src/polynomial/QuarticPolynomial.cpp

    src/paths_routing_node.cpp
    src/paths_routing.cpp
    src/match_projection_point.cpp
    src/Obstacles.cpp
    src/FrenetOptimalTrajectory.cpp

)

find_package(catkin REQUIRED  COMPONENTS
    roscpp
    std_msgs
    geometry_msgs
    object_msgs
    waypoint_msgs
    derived_object_msgs
    nav_msgs
    tf2_ros
    tf2_geometry_msgs
    tf
    visualization_msgs
)

find_package(Eigen3 QUIET)
find_package(OsqpEigen QUIET)
find_package(qpOASES QUIET)
find_package(yaml-cpp REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)

catkin_package(
    INCLUDE_DIRS include
)
include_directories("/usr/include/suitesparse") 
include_directories(
    include
    include/common
    include/CubicSpline
    include/polynomial
    ${EIGEN3_INCLUDE_DIR}
    ${catkin_INCLUDE_DIRS}
    ${Boost_INCLUDE_DIRS}
    ${Python3_INCLUDE_DIRS}
)

#dynamic
add_executable(paths_routing_node ${SRC_FILE})
target_link_libraries(paths_routing_node ${catkin_LIBRARIES} ${Python3_LIBRARIES} osqp qpOASES adolc ipopt yaml-cpp cxsparse g2o_core g2o_stuff g2o_solver_csparse g2o_csparse_extension glog)

